package com.zretc.blog.dao;

import com.zretc.api.pojo.Blog;
import org.apache.ibatis.annotations.Mapper;
import java.util.ArrayList;
import java.util.List;

@Mapper
public interface BlogMapper {
    Blog getBlogById(Integer id);
    ArrayList<Blog> getBlogByTitle(String info);
    ArrayList<Blog> getBlogByContent(String info);
    ArrayList<Blog> getBlogByBlogger(String info);
    ArrayList<Blog> getBlogByUser(Integer bloggerId);
    ArrayList<Blog> getBlogByStatus(Integer status);
    ArrayList<Blog> getBlogByLikes();
//    Integer getTotalLikes(Integer bloggerId);
    void addBlog(Blog blog);

    void deleteBlog(Integer id);
    void updateBlog(Blog blog);
    void setBlogStatus(Blog blog);
    void likeBlog(Integer id);

}
